package com.zh.note.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: zhanghuan
 * @date: 2023/5/8 22:09
 * @description: create it
 */
@Service
public class DemoPublisher {

    @Autowired
    private EventPublisher eventPublisher;


    public void addSiteEvent(String message) {
        eventPublisher.publish(new DemoEvent(this, message));
    }

    public void delSiteEvent(String message) {
        eventPublisher.publish(new DemoEvent(this, message));
    }
}
